using System;
using Subsync;
using org.tmatesoft.svn.core.wc;
using org.tmatesoft.svn.core;

namespace Subsync.Core.Subversion
{ 
	/// <summary>
	/// Author: Hoang Duc
	/// </summary>
	public class RevisionInfo
	{
        private string info_author;
        private java.util.Date info_committedDate;
        private long info_committedRevision;
        private java.io.File info_path;
        private SVNURL info_url;
        private java.util.Date info_lastModified;
        private string info_repoURL;
        private string info_fileRepoURL;
        private long info_revision;

        public string author
        {
            get { return info_author; }
        }
        public java.util.Date committedDate
        {
            get { return info_committedDate; }
        }
        public long committedRevision
        {
            get { return info_committedRevision; }
        }
        public java.io.File path
        {
            get { return info_path; }
        }
        public SVNURL url
        {
            get { return info_url; }
        }
        public java.util.Date lastModified
        {
            get { return info_lastModified; }
        }
        public string repoURL
        {
            get { return info_repoURL; }
        }
        public string fileRepoURL
        {
            get { return info_fileRepoURL; }
        }
        public long revision
        {
            get { return info_revision; }
        }

        public RevisionInfo()
        {
        }

        public RevisionInfo(string author, java.util.Date committedDate, long committedRevision,
            java.io.File path, java.util.Date lastModified, string repoURL, string fileRepoURL, long revision)
        {
            this.info_author = author;
            this.info_committedDate = committedDate;
            this.info_committedRevision = committedRevision;
            this.info_path = path;
            this.info_lastModified = lastModified;
            this.info_repoURL = repoURL;
            this.info_fileRepoURL = fileRepoURL;
            this.info_revision = revision;
        }

        public RevisionInfo(string author, java.util.Date committedDate, long committedRevision,
            SVNURL url, java.util.Date lastModified, string repoURL, string fileRepoURL, long revision)
        {
            this.info_author = author;
            this.info_committedDate = committedDate;
            this.info_committedRevision = committedRevision;
            this.info_url = url;
            this.info_lastModified = lastModified;
            this.info_repoURL = repoURL;
            this.info_fileRepoURL = fileRepoURL;
            this.info_revision = revision;
        }

        public override string  ToString()
        {
            if (this.info_path != null)
                return "Author              : " + this.info_author +
                        "\nCommitted Date      : " + this.info_committedDate +
                        "\nCommitted Revision  : " + this.info_committedRevision +
                        "\nPath                : " + this.info_path +
                        "\nLast Modified       : " + this.info_lastModified +
                        "\nRepository Root URL : " + this.info_repoURL +
                        "\nURL Inside Repo     : " + this.info_fileRepoURL +
                        "\nRevision            : " + this.info_revision;
            else
                return "Author              : " + this.info_author +
                        "\nCommitted Date      : " + this.info_committedDate +
                        "\nCommitted Revision  : " + this.info_committedRevision +
                        "\nPath                : " + this.info_url +
                        "\nLast Modified       : " + this.info_lastModified +
                        "\nRepository Root URL : " + this.info_repoURL +
                        "\nURL Inside Repo     : " + this.info_fileRepoURL +
                        "\nRevision            : " + this.info_revision;
        }
	}
}
